<ion-view view-title="产品详情" >
    <ion-nav-buttons side="left">
        <back-button></back-button>
    </ion-nav-buttons>
    <ion-content ng-class="{'has-loading': isOffline}">

        <ion-refresher pulling-text={{PULLING_TEXT}} pulling-icon="" refreshing-text={{REFRESHING_TEXT}}
                       on-refresh="doRefresh()"></ion-refresher>
        <div style="padding-bottom:15px"></div>
        <!-- panel -->
        <div class="panel">
            <div class="item">
                <span class="title">产品名称</span>
                <span class="rtl">{{fund.prod_name | defString}}</span>
            </div>
            <div class="item">
                <span class="title">基金代码</span>
                <span class="rtl">{{fund.prod_code | defString}}</span>
            </div>
            <div class="item">
                <span class="title">起购金额</span>
                <span class="rtl">{{fund.prod_min_subscribe | prodMinSubscribe : 2}}</span>
            </div>
            <div class="item">
                <span class="title">风险</span>
                <span class="rtl">{{fund.prod_risk_level | dictionary : 'prodRisks'}}</span>
            </div>
        </div>
        <!-- datatables -->
        <div ng-if="fund.prod_status==4">
            <div class="panel_head">起息时间和收益显示时间</div>
            <div class="datatables" ng-bind-html="fund.subscribe_desc"></div>
            <div class="panel_head">赎回到账时间和金额</div>
            <div class="datatables" ng-bind-html="fund.redeem_desc"></div>
        </div>
        <div ng-if="fund.prod_status!=4">
            <div class="redeem">
                <div class="panel_head">起息时间和收益显示时间<br /><span class="fs0 clr3">遇节假日顺延至下一交易日</span></div>
                <div class="datatables" ng-bind-html="fund.subscribe_desc"></div>
            </div>
            <div class="redeem" ng-class="{method : fund.prod_source==1}">
                <div class="panel_head">赎回到账时间<br /><span class="fs0 clr3">赎回到账时间根据不同的支付方式会有不同，遇节假日顺延至下一交易日</span></div>
                <div ng-bind-html="fund.redeem_desc"></div>
            </div>
        </div>
        <!-- panel -->
        <div class="panel">
            <div class="item">
                <span class="title">分红方式</span>
                <span class="rtl">{{fund.prod_share_type | dictionary : 'prodShareTypes'}}</span>
            </div>
            <div class="item">
                <span class="title">基金公司</span>
                <span class="rtl">{{fund.org_name | defString}}</span>
            </div>
            <div class="item">
                <span class="title">基金经理</span>
                <span class="rtl">{{fund.manager_name | defString}}</span>
            </div>
            <div class="item">
                <span class="title">投资范围</span>
                <div class="word-wrap" ng-bind-html="fund.prod_invest_scope"></div>
            </div>
        </div>
        <div class="little-tip">基金有风险，投资需谨慎！购买前需仔细阅读基金合同和招募说明书等法律文件。</div>
    </ion-content>

    <ion-footer-bar class="footer">
        <dl>
            <dt>购买费率：<em>{{fund.prod_rate | defString}}</em>%</dt>
            <dd>
                <a ng-if="fund.prod_status== 0 || fund.prod_status == 3 || fund.prod_status == 4" class="btn"
                   buy-button prod_code="{{fund.prod_code}}" prod_source="{{fund.prod_source}}">购买</a>
                <a ng-if="fund.prod_status== 2" class="btn disable">暂停申购</a>
                <a ng-if="fund.prod_status == 5" class="btn disable">封闭期</a>
                <a ng-if="fund.prod_status== 1" class="btn disable">暂停交易</a>
            </dd>
        </dl>
    </ion-footer-bar>
</ion-view>